﻿cmake_minimum_required(VERSION 3.10)

set(SOURCE_FILES
        ${PROJECT_SOURCE_DIR}/UDataFrame/charset_utils.h
        ${PROJECT_SOURCE_DIR}/UDataFrame/UDataBase.h
        ${PROJECT_SOURCE_DIR}/UDataFrame/UDataBase.inl
        ${PROJECT_SOURCE_DIR}/UDataFrame/UDataFrame.cpp
        ${PROJECT_SOURCE_DIR}/UDataFrame/UDataFrame.inl
        ${PROJECT_SOURCE_DIR}/UDataFrame/UDataFrame.h
        ${PROJECT_SOURCE_DIR}/UDataFrame/UDataView.h
        ${PROJECT_SOURCE_DIR}/UDataFrame/UDataView.inl
)

add_library(uframe_static ${SOURCE_FILES})
target_include_directories(uframe_static PUBLIC
        ${CMAKE_CURRENT_SOURCE_DIR}
        ${RE2_INCLUDE_DIR}
        ${ABSL_INCLUDE_DIR}
        ${EXTRA_INCLUDE_DIR}
)


target_link_libraries(uframe_static
        PUBLIC
        ${RE2_LIB_DIR}/libre2.dylib
        ${ABSL_LIB_DIR}/libabsl_base.dylib
        ${ABSL_LIB_DIR}/libabsl_log_severity.dylib
        ${ABSL_LIB_DIR}/libabsl_synchronization.dylib)

file(GLOB HEADER_FILES "${PROJECT_SOURCE_DIR}/UDataFrame/*.h")
install(FILES ${HEADER_FILES} DESTINATION include/UDataFrame)